<!--
  ~
  ~   ~ MIT License
  ~   ~
  ~   ~ Copyright (c) 2021-2022 yangrunkang
  ~   ~
  ~   ~ Author: yangrunkang
  ~   ~ Email: yangrunkang53@gmail.com
  ~   ~
  ~   ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~   ~ of this software and associated documentation files (the "Software"), to deal
  ~   ~ in the Software without restriction, including without limitation the rights
  ~   ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~   ~ copies of the Software, and to permit persons to whom the Software is
  ~   ~ furnished to do so, subject to the following conditions:
  ~   ~
  ~   ~ The above copyright notice and this permission notice shall be included in all
  ~   ~ copies or substantial portions of the Software.
  ~   ~
  ~   ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~   ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~   ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~   ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~   ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~   ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~   ~ SOFTWARE.
  ~
  -->

<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<body>
<div th:fragment="nav_profile(total,source)">
    <nav class="mb-1">
        <div class="nav nav-tabs">
            <a th:class="${source == 'content'}?'nav-item nav-link cv-link active':'nav-item nav-link cv-link'" th:href="'/profile/'+${memberIndexDto.memberEnhance.member.userId}+'/content'"><img class="lazyload cv-icon-item" th:data-src="${ossStatic} + @{/icons/system/zhishi.svg}"/> 文章<span th:if="${source == 'content'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>
            <a th:class="${source == 'radio'}?'nav-item nav-link cv-link active':'nav-item nav-link cv-link'" th:href="'/profile/'+${memberIndexDto.memberEnhance.member.userId}+'/radio'"><img class="lazyload cv-icon-item" th:data-src="${ossStatic} + @{/icons/system/radio.svg}"/> 电台<span th:if="${source == 'radio'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>
            <a th:class="${source == 'message'}?'nav-item nav-link cv-link active':'nav-item nav-link cv-link'" th:href="'/profile/'+${memberIndexDto.memberEnhance.member.userId}+'/message'"><img th:src="${ossStatic} + @{/icons/system/goutong.png}" class="cv-icon-item" alt="留言板"/> 留言板<span th:if="${source == 'message'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>
            <a th:class="${source == 'attention'}?'nav-item nav-link cv-link active':'nav-item nav-link cv-link'" th:href="'/profile/'+${memberIndexDto.memberEnhance.member.userId}+'/attention'"><img th:src="${ossStatic} + @{/icons/system/attention.png}" class="cv-icon-item" alt=""/> 关注<span th:if="${source == 'attention'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>
            <a th:class="${source == 'fans'}?'nav-item nav-link cv-link active':'nav-item nav-link cv-link'" th:href="'/profile/'+${memberIndexDto.memberEnhance.member.userId}+'/fans'"><img th:src="${ossStatic} + @{/icons/system/fans.png}" class="cv-icon-item" alt=""/> 粉丝<span th:if="${source == 'fans'}" class="badge bg-gradient rounded-3 fw-normal bg-warning text-dark ms-1" th:text="${total}"></span></a>
        </div>
    </nav>
</div>

</body>
</html>
